﻿using System;

namespace Anmlz.Services
{
    using Anmlz.Services.Contracts;

    public class BreedImageTypeService : IBreedImageTypeService
    {
        public bool IsTypeValid(string type)
        {
            type = type.ToLower();
            switch (type)
            {
                case "adult":
                case "pet":
                    return true;
                    default:
                    return false;
            }
        }

        public BreedImageType GetImageType(string type)
        {
            switch (type)
            {
                case "adult":
                    return BreedImageType.Adult;
                case "pet":
                    return BreedImageType.Pet;
                default:
                    throw new Exception("Wrong parameter");
            }
        }
    }
}
